def gt(args):
    return args[0] > args[1]

def gte(args):
    return args[0] >= args[1]

def lt(args):
    return args[0] < args[1]

def lte(args):
    return args[0] <= args[1]

def add(args):
    return reduce(lambda i, j: i + j, args)

def sub(args):
    return reduce(lambda i, j: i - j, args)

def mul(args):
    return reduce(lambda i, j: i * j, args)

def div(args):
    return reduce(lambda i, j: i / j, args)

def notf(args):
    return not args[-1]

def orf(args):
    return any(args)

def andf(args):
    return all(args)

def eq(args):
    return all([args[i] == args[i+1] for i in range(len(args)-1)])

rename = {'eq':'=','gt':'>','gte':'>=','lt':'<','lte':'<=','add':'+','sub':'-','mul':'*','div':'/',\
            'notf':'not','orf':'or','andf':'and'}
